import { ArticleThumbsEntity } from './article-thumbs.entity';
import { DateTransformer } from './../utils/dateTransformer';
import { Entity, Column, PrimaryGeneratedColumn, BaseEntity, OneToMany, JoinColumn } from 'typeorm';
import { CommonEntity } from './common.entity';

@Entity('article')
export class ArticletEntity extends CommonEntity{
    
    @PrimaryGeneratedColumn({type:'bigint'})
    id: string

    @Column()
    title: string

    @Column()
    subtitle: string

    @Column()
    keywords: string

    @Column({comment:'文章摘要'}) 
    brief:string
 
    @Column() 
    content: string;

    @Column() 
    poster:string;

    @Column({comment:'创建人id',type:'bigint',nullable:true})
    userId:string

    @Column({comment:'分类id',nullable:true}) 
    cateId:number

    @Column({comment:'观看次数'})
    views:number

    @Column({comment:'点赞次数'})
    thumbs:number

} 